\documentclass{beamer}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{verbatim}
\usepackage{array}
\usepackage{multirow}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subfigure}
\usecolortheme[RGB={152,7,29}]{structure}
\usetheme{Warsaw}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes,calc,decorations,decorations.fractals,decorations.shapes,decorations.text,decorations.pathmorphing,decorations.pathreplacing}
\tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]
\definecolor{nodeColor}{rgb}{0.62,0.72,0.89}
\usepackage{xxcolor}


\defbeamertemplate*{footline}{miniframes theme}
{
  \leavevmode
  \hbox
  {%
      \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
        \usebeamerfont{author in head/foot}\insertshorttitle%
      \end{beamercolorbox}%
      \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
        \usebeamerfont{title in head/foot}S8 II%
      \end{beamercolorbox}
  }
  \vskip0pt
}

\newcommand{\up}[1]{\textsuperscript{#1}}

\title{Multimedia Toolbox}
\author{I. ALMOU, C. CADORET, K. IMADOUEDDINE,\\J-F. LASCOUTX, N. LAVALL\'{E}E, Y. PATURANGE}

\institute
{
    Amaury Darsch
}

\logo{\includegraphics[height=12px]{esilv.png}}

\date{July, 1\up{st} 2009}

\begin{document}

\frame{\titlepage}

\frame{\tableofcontents}

\section{Introduction}

\frame
{
\frametitle{Introduction}
    \begin{itemize}
      \item Sounds and graphics exist everywhere
      \item Multimedia = text, image, sound, speech, video, and computer programs.
      \item In need to :
      \begin{itemize}
      \item Read/Write PCM sounds and RAW images
      \item Display them graphically
      \item Filter
      \item Compress them (lossless and lossy )
      \item FFT/DCT computation
      \item Mix, combine and concatenate
      \end{itemize}
\end{itemize}
}
\frame
{
\frametitle{Introduction}
    \begin{itemize}
      \item Object: Develop a complete Multimedia Toolbox
      \item Project objectives : Simplicity,efficiency and effectiveness,portability.
    \end{itemize}
}
\section{Sound}
\begin{frame}{}
  \tableofcontents[currentsection, hideothersubsections]
\end{frame}

\subsection{WAV}
\frame
{
\frametitle{WAVE file format}
    \begin{itemize}
		\item Compatible Windows, Linux, Mac.
		\item Values stored in little endian.
		\item Limited to 4GB in size (32 bit unsigned interger).
		\item RIFF wrapper stores data in chunks.
		\item Pulse Code Modulation (PCM).
			\\Uncompressed format.
			\\Discretization of analogic signal based on sampling rate.
    \end{itemize}
}

\subsection{Combining sounds}
\frame
{
    \frametitle{Combining sound waves}
        Sources :\\
        \begin{beamerboxesrounded}{Sources waves}

		\begin{center}
        \begin{tabular}{cc}
		\includegraphics[scale=0.25]{../Rapport_Latex/slice_of_a_300_Hz_sine_wave.jpg} &
		        \includegraphics[scale=0.25]{../Rapport_Latex/slice_of_a_500_Hz_sine_wave.jpg} \\
		 300 Hz & 500 HZ\\
		\end{tabular}
		\end{center}

        \end{beamerboxesrounded}
        Simple addition :\\
        \begin{beamerboxesrounded}{Combined wave}
        \begin{center}
        \begin{tabular}{cc}
        \includegraphics[scale=0.2]{../Rapport_Latex/adding_300_and_500_Hz.jpg} &
        \includegraphics[scale=0.22]{../Rapport_Latex/resulting_wave.jpg}\\
        \end{tabular}
        \end{center}
        \end{beamerboxesrounded}
}

\frame
{
    \frametitle{Combining sound waves}
        Three methods to implement the wave addition :
        \begin{itemize}
        \item Simple addition : the resulting sound may saturate by reaching, at some points, the maximum sound pressure value allowed by the sound file data (sample size).
        \item Mean : the sum of the two waves is divided by two in order to avoid any data overflow.
        \item Normalization : after the addition the resulting wave is scaled down to fit the maximum sound pressure level allowed by the sound file data.
        \end{itemize}
}

\subsection{Sound signals}

\frame
{
    \frametitle{Sound signal generation}

	\begin{itemize}
    \item sinusoidal, square, triangular, positive sinusoidal.
	\item can choose signal type, signal frequency, signal amplitude, duration and sampling frequency.
	\item sinusoidal wave allows creating music. e.g. Concert A (La 4) is a 440 Hz sinusoidal wave.
	\item one octave to the one above, you need to double the frequency.
	\item Nyquist-Shannon sampling theorem:
	sampling frequency >= twice the sound frequency
	\end{itemize}
}


\subsection{Concatenation}
\frame
{
    \frametitle{Concatenation}
     \begin{itemize}
      \item WAVE Concatenation: assemble two sounds together
      \item 3 main parts:
      \begin{itemize}
      \item Channels sound concatenation: Merged file = Max of channels of source files if coded differently
      \item Waves sound concatenation:
                         \begin{enumerate}
                          \item calculate the total length and data length of all files;;
                          \item specify the channels, SampleRate and BitsPerSample of the output file;;
                          \item start reading data that is stored;;
                          \item append it to the merged file. SampleRate and BitsPerSample.
                        \end{enumerate}
      \item Data sound concatenation : Combine Data ~sound 1[][] with Data ~sound 2[][]
    \end{itemize}
    \end{itemize}

}

\subsection{FFT}
\frame
{
    \frametitle{A DFT decomposition}

	\begin{beamerboxesrounded}{Discrete Fourier transform}
	$F_{n}=\displaystyle\sum_{k=0}^{N-1}e^{-j\frac{2\pi}{N}nk}f_{k}$
	\end{beamerboxesrounded}

	\begin{itemize}
	\item Decomposition of the $N$-point DFT into smaller DFTs
	\end{itemize}

	\begin{beamerboxesrounded}{Fast Fourier transform}
	$F(k)~=~\displaystyle\sum_{m=0}^{\frac{N}{2}-1}f(2m)e^{-j\frac{2\pi}{N}k2m}+
\displaystyle\sum_{m=0}^{\frac{N}{2}-1}f(2m+1)e^{-j\frac{2\pi}{N}k(2m+1)}$
	\end{beamerboxesrounded}

}

\frame
{
    \frametitle{Reordering process}
    \begin{center}
   \begin{tikzpicture}[node distance=12mm,auto,thick]
        \tikzstyle{link}=%
          [%
            text=black,
            minimum size=2mm,%
            circle%
          ]
          \tikzstyle{node}=%
          [%
            fill=red!50!black!20,%
            draw=red!50!black,%
            minimum size=6pt,
            rectangle%
          ]

          \node [node] (A) at (0,4) {0 1 2 3 4 5 6 7};

          \node [node] (B0) at (-2.5,3) {0 2 4 6};
          \path[thick,shorten >=1pt,-stealth'] (A) edge (B0);

          \node [node] (C0) at (-1.5,2) {0 4};
          \path[thick,shorten >=1pt,-stealth'] (B0) edge (C0);

          \node [node] (D0) at (-1,1) {4};
          \path[thick,shorten >=1pt,-stealth'] (C0) edge (D0);
          \node [node] (D1) at (-2,1) {0};
          \path[thick,shorten >=1pt,-stealth'] (C0) edge (D1);


          \node [node] (C1)  at (-3.5,2) {2 6};
          \path[thick,shorten >=1pt,-stealth'] (B0) edge (C1);
          \node [node] (D2)  at (-3,1){6};
          \path[thick,shorten >=1pt,-stealth'] (C1) edge (D2);
          \node [node] (D3) at (-4,1) {2};
          \path[thick,shorten >=1pt,-stealth'] (C1) edge (D3);

          \node [node] (B1) at (2.5,3) {1 3 5 7};
          \path[thick,shorten >=1pt,-stealth'] (A) edge (B1);

          \node [node] (C2)  at (3.5,2){1 5};
          \path[thick,shorten >=1pt,-stealth'] (B1) edge (C2);
          \node [node] (D4) at (4,1) {5};
          \path[thick,shorten >=1pt,-stealth'] (C2) edge (D4);
          \node [node] (D5) at (3,1) {1};
          \path[thick,shorten >=1pt,-stealth'] (C2) edge (D5);

          \node [node] (C3)  at (1.5,2){3 7};
          \path[thick,shorten >=1pt,-stealth'] (B1) edge (C3);
          \node [node] (D6) at (2,1) {7};
          \path[thick,shorten >=1pt,-stealth'] (C3) edge (D6);
          \node [node] (D7) at (1,1) {3};
          \path[thick,shorten >=1pt,-stealth'] (C3) edge (D7);

   \end{tikzpicture}
  \end{center}
}

\frame
{
	\begin{itemize}
	\item Direct computation of the DFT requires a number of multiplies on the
order of $N^{2}$
	\item FFT reduces that number to the order of $N\log N$.
	\end{itemize}
}

\subsection{Equalizing}
\frame
{
    \frametitle{Graphic equalizer}
		Altering the amplitude of a chosen frequency band.
		\\Several types of equalizer depending on the use.
		\begin{itemize}
			\item MP3 players includes 5 bands equalizer.
			\item Profesional use may requier up to 31 bands.
			\item In our software, the equalizer is 10 bands.
		\end{itemize}
		The more the bands, the thinner each band, the more precise the targeted frequency band.	
}

\section{Image}
\begin{frame}{}
  \tableofcontents[currentsection, hideothersubsections]
\end{frame}

\subsection{Theory}
\frame
{
    \frametitle{General image theory}
    \begin{itemize}
      \item Image is usually used to design a 2D representation of an object or a person.
      \item Images can be natural, artificial or psychological
      \item The prefix " photo " means light, clarity and the suffix "graphy" means paint, draw, write
    \end{itemize}
}

\frame
{
    \frametitle{Image formats}
    In the framework of this document, we'll rank image formats into three categories:
    \begin{itemize}
      \item The raw format (BMP format)
      \item Lossless compression
      \item Lossy compression (JPEG format)
    \end{itemize}
}

\frame
{
    \frametitle{Colorimetric Spaces}
    \begin{figure}
        \centering
        \subfigure[subtractive synthesis]{\label{sub1} \includegraphics[width=4cm]{cmy}}
        \subfigure[additive synthesis]{\label{sub2} \includegraphics[width=4cm]{rgb}}
        \caption{Differences between additive and subtractive synthesis}
        \label{Colors}
    \end{figure}

}

\frame
{
    \frametitle{BMP storage - Header}
    \begin{center}
        \includegraphics[scale=0.5]{bmpData}
    \end{center}
}

\frame
{
    \frametitle{BMP storage - Data}
    \begin{itemize}
      \item 2 colors BMP has one bit per pixel (1 byte per 8 pixels)
      \item 16 colors BMP has four bits per pixel (1 byte per 2 pixels)
      \item 256 colors BMP has eight bits per pixel, (1 byte per 1 pixel)
      \item Image with reals colors, (3 bytes per 1 pixel)
    \end{itemize}
}

\frame
{
    \frametitle{Lossless and lossy compression}
    Lossless compression: Every pixel 1,2,3,4 in the raw format (X set) has a one-to-one correspondence in the lossless compression (Y set).
    \newline
    \begin{center}
    \includegraphics[scale=0.5]{bijection}
    \end{center}
    Lossy compression: reduce the entropy of the image while minimizing the degradation perceptible by the eye
}

\frame
{
    \frametitle{Direct Cosine Transform (DCT)}
	
	\begin{itemize}
	\item component of compression algorithms: JPEG,MPEG, AAC, Vorbis, MP3, etc.
	\item very efficient at grouping energy: most information is held by only a few coefficients
	\item similar to DFT (Discrete Fourier Transform) but with real numbers, generating real coefficients.
	\item Other transforms: DFT, DWT,...
	\end{itemize}
}

\frame
{
    \frametitle{JPEG}
	
	\begin{itemize}
	\item image compression formats
	\item lossless algorithm (with a compression ratio around 2)
	\item lossy algorithm (with compression ratios between 3 and 10)
	\item Principle:
		\begin{enumerate}
		\item Cutting up the picture
		\item Transforming colors to YUV or YCbCr
		\item Under-sampling of chroma by a factor of 2
		\item Direct Cosine Transform
		\item Quantification
		\item Diagonal coding
		\item RLE (Run-Length Encoding) on the 0 value
		\item Entropic coding (Huffmann, arithmetic coding,...)
		\end{enumerate}
	\end{itemize}
}

\section{Implementation}
\begin{frame}{}
  \tableofcontents[currentsection, hideothersubsections]
\end{frame}

\frame
{
	\frametitle{Qt}
	\includegraphics[scale=0.15]{../Rapport_Latex/qt_logo.png}

	\begin{itemize}
	\item C++ class library and a set of tools for building multiplatform GUI programs
	\item a "write once, compile anywhere" approach
	\item Qt is released under the LGPL license
	\end{itemize}
}

\frame
{
	\frametitle{Qwt}

	\begin{itemize}
	\item Qt Widgets for Technical Applications
	\item Qt extension
	\item Graphic representation of data in 2D
	\end{itemize}
}
\frame
{
    \frametitle{Conclusion}
\begin{itemize}
    \item Software objectives achieved:
          \begin{itemize}
          \item Simplicity: Software easy to use
          \item Efficiency and effectiveness:resources maximally exploited  (unnecessary idle time avoided)
          \item Portability: Software working on Windows and Linux
          \end{itemize}
\end{itemize}
}
\frame
{
    \frametitle{Conclusion}
\begin{itemize}
      \item  Education objectives achieved:
          \begin{itemize}
          \item Learn to share tasks between us
          \item Helping each other to correct the various difficulties encountered
          \item Learn from the mistakes of others.
          \end{itemize}
\end{itemize}
}
\frame
{
\frametitle{Thanks}
      Special thanks to everyone who contributed to the realization of this project
}
\end{document} 